home *** CD-ROM | disk | FTP | other *** search
- GenModula 1.12 - Modula 2 Sourcecode Generator For GadToolsBox
- ------------------------------------------------------------
-
- This program is directly ported from OG, the Oberon sourcecode
- generator by Thomas Igracki and Kai Bolay.
-
-
- Please, see documentation of OG.mod for more information and history:
- » GadToolsBox's great Oberon Source Generator
- » ===========================================
- »
- » This is the second release of the external Oberon source generator for
- » GadToolsBox 2.x. Please use it instead of the built in source generator
- » because some the internal version is buggy and will not be updated any more.
- »
- » Let's explan the history of generating Oberon source with GadToolsBox:
- » I (Kai Bolay) thougt that it would be a good idea that GadToolsBox supports
- » Oberon so I changed Jan van den Baard's C generator "GenC.c" to
- » "GenOberon.c" and asked Jan to add it to GTB. With GTB 2.0 Jan came up with
- » the idea of external source generators. Jan helped me (in fact he did all
- » the work! Thanks, Jan!) to make "GenOberon.c" a standalone program. Now
- » Thomas Igracki did the great job of converting to C program "GenOberon.c"
- » to the Oberon program "OG.mod". I did some minor modifications to "OG.mod"
- » and released it.
-
-
- This program does almost the same as OG. Only some additions and fixes
- are made. However the complete code is restructured and split into
- modules. The definition file including the module interface contains
- only very few objects, this may be expanded in future.
-
-
- Usage:
- GenModula: NAME/A,TO=AS/A,RASTER/S,UNDERMOUSE/S,NODEF/S
-
- NAME
- Desined GadToolsBox gui-file,
-
- TO
- Basename for module and file to be generated, The name may be preced
- with a path.
-
- RASTER
- Boolean argument to get a filled background. This will be done only
- if the window contains bevel-boxes.
-
- UNDERMOUSE
- Opens the window at the actual mouse position.
-
- NODEF
- Generate a definition file with suffix .nodef. This opition is
- usefull when update an allready existing gui. It is now not
- neccessary to compile the module which use the gui. Furthermore you
- can compare the new definition file ending with "nodef" against the
- old one.
-
-
- Interface:
- I give just a few hints about the generated interface files. Please
- look at the definition files.
-
- Procedures to get and get rid of a screen, window or gadgets are named
- in correspondece with gadtools.library: CreateXXX and FreeXXX. This
- may show you: these procedures handle more than simply open and
- close a screen or window!
- All procedures include the actual project name (see GadToolsBox for more).
- About the return values: a return value of 0 indicate success, other values
- indicate an error, see generated source for a concrete value.
-
- Screen:
- PROCEDURE CreateTestScreen ( pubScreenName :ARRAY OF CHAR) :CARDINAL;
- PROCEDURE FreeTestScreen;
-
- CreateXXXScreen can have an argument, this depends on the screen type.
-
- Gadgets:
- PROCEDURE CreateListGadgets () :CARDINAL;
-
- This procedure is used to create gadgets before open the window.
- The gadgetlist is implicit deallocated by FreeXXXWindow.
-
- Windows:
- PROCEDURE CreateListWindow ( createGadgets :BOOLEAN) :CARDINAL;
- PROCEDURE FreeListWindow;
- PROCEDURE RefreshListWindow;
-
- Creation of window is done including all neccessary startup. Use
- createGadgets = FALSE only and if you called CreateXXXGadgets
- before CreateXXXWindow!
- After creating the window it is already complete refreshed.
-
- After getting the IDCMP-message refreshWindow you should call
- RefreshXXXWindow. Do NOT surround this call by GTBeginRefresh and
- GTEndRefresh, this is handled internal. Since using GadToolsBox
- you don't need to render anything to refresh your window.
-
- To access gadgets, menus or windows use but not change them by
- given pointers in the definition file. Remember to use explicit
- constants and not the values of them.
-
- When using a GetFile-gadget you had to link the programm with the
- "l" option for additional files. Type:
- -lfullpath/bases.o -lfullpath/boopsi.o programname
- Remember the absent space after the l-option.
-
-
- About different behaviour of GenModula to OG (Oberon Generator):
- First of all, I had to generate a seperate definition file for Modula.
- I think this is a great advantage for you because you don't need to
- check the whole implementation nor you have to generate a definition
- file with a tool (included with Oberon but this doesn't help a Modula User).
-
- You don't care about the correct window rendering. Not for the first
- time when open a window nor in further times. Just call
- RenderXXXWindow when getting a refreshWindow message.
- The treatment of window rendering and refreshing is much improved to
- OG. In particular using the RASTER-option the rendering is done in the
- right order. Gadgets will be refreshed only at one time.
-
-
- Contact me if you have suggestions, questions or bugs:
-
- Reiner B. Nix
- Snail Mail:
- Geranienhof 2
- 50769 Köln Seeberg
- Germany
-
- EMail:
- UseNet: rbnix@pool.informatik.rwth-aachen.de
-